/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const mesRouter = {
  path: '/mes',
  component: Layout,
  redirect: '/mes/product-modeling',
  name: 'Mes',
  alwaysShow: true,
  meta: {
    title: 'Mes',
    icon: 'table'
  },
  children: [
    {
      path: 'product-modeling',
      component: () => import('@/views/mes/product-modeling'),
      name: 'ProductModeling',
      meta: { title: '产品建模' }
    },
    {
      path: 'bom',
      component: () => import('@/views/mes/bom'),
      name: 'Bom',
      meta: { title: 'Bom管理' }
    },
    {
      path: 'process-modeling',
      component: () => import('@/views/mes/process-modeling'),
      name: 'ProcessModeling',
      meta: { title: '工艺建模' }
    },
    {
      path: 'product-schedule',
      component: () => import('@/views/mes/product-schedule'),
      name: 'ProcessModeling',
      meta: { title: '计划排产' }
    },
    {
      path: 'error-prevention-management',
      component: () => import('@/views/mes/error_prevention-management/index'),
      name: 'Error-Prevention-management',
      meta: { title: '防错管理' }
    },
    {
      alwaysShow: true,
      path: 'quality-management',
      component: () => import('@/views/mes/quality-management/index'), // Parent router-view
      name: 'Quality-Management',
      meta: { title: '质量管理' },
      redirect: '/mes/quality-management/incoming-inspection',
      children: [
        {
          path: 'incoming-inspection',
          component: () => import('@/views/mes/quality-management/incoming-inspection/index'),
          name: 'Incoming-Inspection',
          meta: { title: '来料检验' }
        },
        {
          path: 'product-inspection',
          component: () => import('@/views/mes/quality-management/product-inspection/index'),
          name: 'Product-Inspection',
          meta: { title: '产品检验' }
        },
        {
          path: 'production-sampling',
          component: () => import('@/views/mes/quality-management/production-sampling/index'),
          name: 'Production-Sampling',
          meta: { title: '生产采样' }
        },
      ]
    },
  ]
}
export default mesRouter
